<template>
  <div>
    <div class="dashboard-container">
      

      <div class="big-back-box">
        <div class="top" style="margin-bottom: 20px">工商年报信息填写</div>
        <!-- 卡片 -->
        <div style="width: 600px; margin: 0 auto">
          <el-form ref="form" :model="form" label-width="130px">
            <!-- 表单填写框 -->
            <el-form-item label="公司名称">
              <el-input v-model="form.company"></el-input>
            </el-form-item>
            <el-form-item label="资产总额">
              <el-input v-model="form.asset"></el-input>
            </el-form-item>
            <el-form-item label="所有者权益合计">
              <el-input v-model="form.owner"></el-input>
            </el-form-item>
            <el-form-item label="负债总额">
              <el-input v-model="form.debt"></el-input>
            </el-form-item>
            <el-form-item label="营业总收入">
              <el-input v-model="form.totalIncome"></el-input>
            </el-form-item>
            <el-form-item label="主营业收入">
              <el-input v-model="form.mainIncome"></el-input>
            </el-form-item>
            <el-form-item label="利润总额">
              <el-input v-model="form.totalProfit"></el-input>
            </el-form-item>
            <el-form-item label="净利润">
              <el-input v-model="form.netProfit"></el-input>
            </el-form-item>
            <el-form-item label="纳税总额">
              <el-input v-model="form.tax"></el-input>
            </el-form-item>
              <el-form-item label="价格">
                <el-link type="danger" >5000元</el-link>
            
            </el-form-item>
            <!-- 按钮 -->
            <el-form-item>
              <el-button type="primary" @click="pay">提交</el-button>
              <el-button>取消</el-button>
            </el-form-item>
          </el-form>
         
         
        </div>
      </div>
    </div>
  </div>
</template>
<script>

import {InsertAnnualReport} from "@/api/companyServer"
export default {
  data() {
    return {
      size: "",
      form: {
        company: "",
        asset: "",
        owner: "",
        debt: "",
        totalIncome: "",
        mainIncome: "",
        totalProfit: "",
        netProfit: "",
        tax: "",
      },
    };
  },
  methods: {
    pay() {
    InsertAnnualReport(this.form).then(res=>{
    console.log(res);
    
    this.$confirm("确定购买?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
        center: true,
      })
        .then(() => {
          // 如果未登录,提示错误信息
            if(res.data.message){
            this.$message({
            type: "success",
            message:res.data.message,
          });
            }else{
              this.$message("未登录,请登录");
            }
         
        })
      })

  
    },
  },
};
</script>

<style lang="scss" scoped>
// 页头LOGO
.top {
  height: 50px;
  width: 1080px;
  margin-left: 45px;
  // background-color: lightgray;
  font-size: 30px;
  text-align: center;
  line-height: 50px;
}

// 大盒子
.big-back-box {
  width: 1080px;
  margin: 0 auto;
}

// 原框架自带
.dashboard {
  &-container {
    margin-top: 30px;
    // margin-left: 30px;
    // margin-right: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}

// 页脚
.footer {
  height: 300px;
  background-color: blue;
}
.footer-back-box {
  width: 1080px;
  margin-left: 45px;
}
.footer-title {
  height: 30px;
  line-height: 40px;
  padding-left: 10px;
}
.footer-link-card {
  width: 200px;
  background-color: orange;
  margin-left: 10px;
}

// 模板-卡片
.text {
  font-size: 14px;
}
.item {
  padding: 18px 0;
}
.box-card {
  width: 480px;
}
</style>